#include <iostream>
#include <vector>

using namespace std;

int main() {
    vector<unsigned long long> solu;
    unsigned count = 0;
    unsigned n;
    solu.push_back(1);
    while (cin >> n) {
        while (count < n)
            solu.push_back(solu[solu.size() - 1] * ++count);
        cout << solu[n] << endl;
    }
    return 0;
}
